Skip to content

Sync eng/common directory with azure-sdk-tools for PR 11807#6712

Merged
praveenkuttappan merged 3 commits intomainfrom
sync-eng/common-update_release_completion_script_for_java-11807
Aug 22, 2025
Merged

Sync eng/common directory with azure-sdk-tools for PR 11807#6712
praveenkuttappan merged 3 commits intomainfrom
sync-eng/common-update_release_completion_script_for_java-11807

Conversation

@azure-sdk
Copy link
Collaborator

Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#11807 See eng/common workflow

@azure-sdk azure-sdk requested a review from a team as a code owner August 22, 2025 20:51
@azure-sdk azure-sdk added EngSys This issue is impacting the engineering system. Central-EngSys This issue is owned by the Engineering System team. labels Aug 22, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR synchronizes the eng/common directory with azure-sdk-tools for PR 11807, updating a PowerShell script to support processing multiple package information files from a directory instead of just a single file.

Key changes:

  • Modified the Mark-ReleasePlanCompletion.ps1 script to accept either a single package info file or a directory containing multiple package info files
  • Refactored the main processing logic into a reusable function
  • Added directory traversal to process all JSON files in the specified path

# Get all package info file under the directory given in input param and process
Get-ChildItem -Path $PackageInfoFilePath -Filter "*.json" | ForEach-Object {
Write-Host "Processing package info file: $_"
Process-Package $_.FullName
Copy link

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script unconditionally treats the input path as a directory and attempts to enumerate JSON files, but it should first check if the path is a file or directory. If it's a single file, it should process just that file; if it's a directory, then enumerate the JSON files. This breaks backward compatibility with existing usage that passes a single file path.

Suggested change
Process-Package $_.FullName
# If the path is a file, process just that file. If it's a directory, enumerate JSON files.
if (Test-Path $PackageInfoFilePath -PathType Leaf) {
Write-Host "Processing package info file: $PackageInfoFilePath"
Process-Package $PackageInfoFilePath
}
elseif (Test-Path $PackageInfoFilePath -PathType Container) {
Get-ChildItem -Path $PackageInfoFilePath -Filter "*.json" | ForEach-Object {
Write-Host "Processing package info file: $_"
Process-Package $_.FullName
}
}
else {
Write-Host "The path $PackageInfoFilePath is neither a valid file nor a directory."
exit 1

Copilot uses AI. Check for mistakes.
@praveenkuttappan praveenkuttappan merged commit ea999bb into main Aug 22, 2025
41 of 44 checks passed
@praveenkuttappan praveenkuttappan deleted the sync-eng/common-update_release_completion_script_for_java-11807 branch August 22, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants